Use HTTP health check for llama-stack/ogx container#123
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/controller/lcore_deployment.go (1)
78-78: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract
/v1/healthinto a shared constant.Using one constant avoids probe-path drift when this endpoint changes.
Suggested diff
+const llamaStackHealthPath = "/v1/health" + llamaStackContainer := corev1.Container{ @@ StartupProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ - Path: "/v1/health", + Path: llamaStackHealthPath, Port: intstr.FromInt32(LlamaStackContainerPort), }, }, @@ LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ - Path: "/v1/health", + Path: llamaStackHealthPath, Port: intstr.FromInt32(LlamaStackContainerPort), }, }, @@ ReadinessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ - Path: "/v1/health", + Path: llamaStackHealthPath, Port: intstr.FromInt32(LlamaStackContainerPort), }, },Also applies to: 89-89, 100-100
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/controller/lcore_deployment.go` at line 78, Extract the hardcoded "/v1/health" probe path into a shared constant and update all uses in the deployment controller so they reference that symbol instead of repeating the literal. Apply this in the code that builds the probe configuration around the deployment setup logic, using the existing deployment-related functions and structs as the touchpoints so the readiness, liveness, and startup probes stay consistent if the endpoint changes.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/controller/lcore_deployment.go`:
- Line 78: Extract the hardcoded "/v1/health" probe path into a shared constant
and update all uses in the deployment controller so they reference that symbol
instead of repeating the literal. Apply this in the code that builds the probe
configuration around the deployment setup logic, using the existing
deployment-related functions and structs as the touchpoints so the readiness,
liveness, and startup probes stay consistent if the endpoint changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7fa91c72-b782-4e08-8bb1-36c947f7a8cf
📒 Files selected for processing (1)
internal/controller/lcore_deployment.go
lpiwowar
left a comment
There was a problem hiding this comment.
LGTM, thank you! Just one small nit. I'm alright if somebody /lgtms without the change. I'll /lgtm tomorrow morning 💯 .
Btw @umago IIRC we can not use startup, liveness and readiness probes for lightspeed-stack because it required authentication for the /health endpoint? I think I encountered this myself. Just trying to figure out whether we can do the same for lightspeed-stack.
Yes, my plan to was to do it for both (llama-stack/ogx and Lightspeed-Stack) and I had the same issue with Lightspeed-Stack. My plan is to bring this issue up to LCORE developers, I think it should be something configurable on their side. |
Replace the TCP socket readiness probe with a proper HTTP GET on /v1/health. Also, add a startup probe and liveness probe that will start only after the startup one succeeds. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lpiwowar, umago The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4a45e7a
into
openstack-lightspeed:lcore-migration
Replace the TCP socket readiness probe with a proper HTTP GET on /v1/health.
Also, add a startup probe and liveness probe that will start only after the startup one succeeds.
Summary by CodeRabbit